package com.jeasonzhao.commons.chs;
public class Region implements java.io.Serializable
{
    public static final String ROOT = "ROOTID";
   private static final long serialVersionUID=1L;
    private String code = null;
    private String name = null;
    private RegionType type = null;
    private RegionDetailedType detailedType = null;
    private String toll = null;
    private String zipcode = null;
    private String parentCode=null;
    private String fullName=null;

    public Region()
    {
    }

    public Region(String parentCode,String code,String name,String fullName
                  ,RegionType type,RegionDetailedType detailedType,String toll,String zipcode)
    {
        this.parentCode=parentCode;
        this.code=code;
        this.name=name;
        this.type=type;
        this.detailedType=detailedType;
        this.toll=toll;
        this.zipcode=zipcode;
        this.fullName=fullName;
    }

    public String getCode()
    {
        return code;
    }

    public RegionDetailedType getDetailedType()
    {
        return detailedType;
    }

    public String getName()
    {
        return name;
    }

    public String getToll()
    {
        return toll;
    }

    public RegionType getType()
    {
        return type;
    }

    public String getZipcode()
    {
        return zipcode;
    }

    public String getParentCode()
    {
        return parentCode;
    }

    public String getFullName()
    {
        return fullName;
    }

    public void setZipcode(String zipcode)
    {
        this.zipcode = zipcode;
    }

    public void setType(RegionType type)
    {
        this.type = type;
    }

    public void setToll(String toll)
    {
        this.toll = toll;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public void setDetailedType(RegionDetailedType detailedType)
    {
        this.detailedType = detailedType;
    }

    public void setCode(String code)
    {
        this.code = code;
    }

    public void setParentCode(String parentCode)
    {
        this.parentCode = parentCode;
    }

    public void setFullName(String fullName)
    {
        this.fullName = fullName;
    }
    public String toString()
    {
        return this.fullName;
    }
    public boolean isLowestLevel()
    {
       return null!=code && code.endsWith("00")==false;
    }
}
